//
//  faceTableViewCell.m
//  One Construction
//
//  Created by apple on 2019/9/11.
//  Copyright © 2019 apple. All rights reserved.
//

#import "faceTableViewCell.h"

@implementation faceTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier
            ];
    if (self) {
        [self addSubview:self.backView];
        [self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_offset(10);
            make.right.mas_offset(-10);
            make.top.mas_offset(13);
            make.height.mas_equalTo(105);
        }];
        
        [self.backView addSubview:self.headImgView];
        [self.headImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_offset(10);
            make.bottom.mas_offset(-13);
            make.top.mas_offset(13);
            make.width.mas_equalTo(125);
        }];
        
        [self.backView addSubview:self.topLable];
        [self.topLable  mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_offset(-13);
            make.height.mas_equalTo(45);
    make.left.mas_equalTo(self.headImgView.mas_right).mas_offset(10);
            make.top.mas_offset(20);
        }];
        
        [self addSubview:self.statusLable];
        [self.statusLable mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.bottom.mas_offset(-13);
            make.width.mas_equalTo(100);
            make.height.mas_equalTo(25);
            
            
        }];
        
        
    }
    return self;
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}





-(myLable *)topLable{
    if (!_topLable) {
        _topLable  = [[myLable alloc]init];
        _topLable.textColor = [UIColor blackColor];
        _topLable.font = [UIFont systemFontOfSize:13];
        _topLable.numberOfLines = 0;
    }
    return _topLable;
    
}
- (UIView *)backView{
    if (!_backView) {
        _backView = [[UIView alloc]init];
        _backView.backgroundColor = [UIColor whiteColor];
        _backView.layer.backgroundColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0].CGColor;
        _backView.layer.cornerRadius = 10;
        _backView.layer.shadowColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.05].CGColor;
        _backView.layer.shadowOffset = CGSizeMake(0,1);
        _backView.layer.shadowOpacity = 1;
        _backView.layer.shadowRadius = 2;
    }
    return _backView;
}
-(UILabel *)statusLable{
    if (!_statusLable) {
        _statusLable = [[UILabel alloc]init];
        _statusLable.layer.cornerRadius = 12.5;
        _statusLable.font = [UIFont systemFontOfSize:14];
    }
    
    return _statusLable;
}



@end
